using BackData;
using Domain.DTOs.ProcessSteps;
using MediatR;

namespace Team.API.Applocation.Command.Makesteps
{
    /// <summary>
    /// 新增成品工艺工序命令（ParentId 固定为 0）
    /// </summary>
    public class CreateMakestepCommand : IRequest<APIResult<MakestepListDTO>>
    {
        /// <summary>工序名称（展示在树或列表中）</summary>
        public string Processname { get; set; }

        /// <summary>工序编号（如 OP10）</summary>
        public string Processcode { get; set; }

        /// <summary>工序描述，方便操作员理解</summary>
        public string Processdescription { get; set; }

        /// <summary>版本号，默认 V1.0</summary>
        public string Version { get; set; } = "V1.0";

        /// <summary>对应成品名称（仅 parentId=0）</summary>
        public string Goodsname { get; set; }

        /// <summary>工序产出物</summary>
        public string Deliverables { get; set; }

        /// <summary>负责人</summary>
        public string Kahuna { get; set; }

        /// <summary>责任部门</summary>
        public string Departmentname { get; set; }

        /// <summary>启用状态（默认启用）</summary>
        public bool IsUse { get; set; } = true;

        /// <summary>工序时长（分钟）</summary>
        public short SpanTime { get; set; }

        /// <summary>绑定设备Id，默认1</summary>
        public long EquipmentId { get; set; } = 1;
        /// <summary>
        /// 当前操作人（来自前端 pinia）
        /// </summary>
        public string? CurrentUserName { get; set; }
    }
}

